﻿@model Mvc.Models.Proyecto
@{
    var options = new AjaxOptions()
                      {
                          Url = Url.Action("Delete", "Proyecto"),
                          LoadingElementId = "",
                          UpdateTargetId = "content",
                          InsertionMode = InsertionMode.Replace, // <-- Replace the content of DOM element
                          HttpMethod = "POST",


                      };  
}

<h2>Delete</h2>

<h3>Are you sure you want to delete this?</h3>
<fieldset>
    <legend>Proyecto</legend>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Nombre)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Nombre)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Codigo)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Codigo)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Branch.nombre)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Branch.nombre)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Departamento.Nombre)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Departamento.Nombre)
    </div>
</fieldset>
@using (Ajax.BeginForm(options)) {
    @Html.AntiForgeryToken()
    <p>
        <input type="submit" value="Delete" /> |
         @Ajax.ActionLink("Regresar", "Index", "proyecto", new AjaxOptions { UpdateTargetId = "content", InsertionMode = InsertionMode.Replace, HttpMethod = "GET" },new { @class = "btn btn-default navbar-btn" })
  
    </p>
}
